package com.cqw.service;

import com.cqw.domain.Activity;
import com.cqw.domain.ActivityGroup;
import com.cqw.exception.CommonException;
import com.cqw.mapper.one.ActivityGroupMapper;
import com.cqw.vo.group.ActivityGroupVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-05-24 15:34
 * @Description:
 */
@Service
@Slf4j
public class ActivityGroupService {

    @Autowired
    private ActivityService activityService;

    @Autowired
    private ActivityGroupMapper activityGroupMapper;

    /**
     * 创建团购活动
     *
     * @return
     */
    public ActivityGroup createActivityGroup(ActivityGroupVO activityGroupVO) {
        Activity activityInfo = activityService.getActivityInfo(activityGroupVO.getActivityId(), false);
        if (activityInfo == null) {
            throw new CommonException("活动不存在");
        }


        return null;
    }
}
